using System.Data;
using ET;
namespace DA
{
	public class Destination_DAL
	{
	private clsConnect cls = new clsConnect();

	#region Getdata
	public DataTable BindGirdtb_Destination(string keywords)
	{
	return cls.Search("sp_tb_Destination_Search", "@KeyWords", keywords);
	}
    //public DataTable BindGirdtb_DestinationDetail(int id)
    //{
    //}
	#endregion

	#region Insert
	public bool Inserttb_Destination(Destination_ET data)
	{
	cls.CreateNewSqlCommand();
	cls.AddParameter("@Destination_Name", data.Destination_Name);
	cls.AddParameter("@Destination_User_Add", data.Destination_User_Add);
	cls.AddParameter("@Destination_Date_Add", data.Destination_Date_Add);
	cls.AddParameter("@Destination_Computer_Add", data.Destination_Computer_Add);
	cls.AddParameter("@Destination_User_Modify", data.Destination_User_Modify);
	cls.AddParameter("@Destination_Date_Modify", data.Destination_Date_Modify);
	cls.AddParameter("@Destination_Computer_Modify", data.Destination_Computer_Modify);
	cls.ExecuteNonQuery("sp_tb_Destination_Insert");
	return true;
	}
	#endregion

	#region Update
	public bool Updatetb_Destination(Destination_ET data)
	{
	cls.CreateNewSqlCommand();
	cls.AddParameter("@Destination_ID", data.Destination_ID);
	cls.AddParameter("@Destination_Name", data.Destination_Name);
	cls.AddParameter("@Destination_User_Add", data.Destination_User_Add);
	cls.AddParameter("@Destination_Date_Add", data.Destination_Date_Add);
	cls.AddParameter("@Destination_Computer_Add", data.Destination_Computer_Add);
	cls.AddParameter("@Destination_User_Modify", data.Destination_User_Modify);
	cls.AddParameter("@Destination_Date_Modify", data.Destination_Date_Modify);
	cls.AddParameter("@Destination_Computer_Modify", data.Destination_Computer_Modify);
	cls.ExecuteNonQuery("sp_tb_Destination_Update");
	return true;
	}
	#endregion

	#region Delete
	public bool Deletetb_Destination(int id)
	{
        cls.Delete("sp_tb_Destination_Delete", "@Destination_ID", id);
	return true;
	}
	#endregion
	}
}